package net.stogi.dsper.ui.client.module.user;

import com.google.gwt.event.shared.GwtEvent;

public class UserProfileEditorClosedEvent extends GwtEvent<UserProfileEditorClosedHandler> {

	public static final GwtEvent.Type<UserProfileEditorClosedHandler> TYPE = new GwtEvent.Type<UserProfileEditorClosedHandler>();

	private boolean persisted;

	public UserProfileEditorClosedEvent(boolean persisted) {
		this.persisted = persisted;
	}

	@SuppressWarnings("unused")
	private UserProfileEditorClosedEvent() {}

	@Override
	public Type<UserProfileEditorClosedHandler> getAssociatedType() {
		return TYPE;
	}

	/**
	 * @return the persisted
	 */
	public boolean isPersisted() {
		return persisted;
	}

	/**
	 * @param persisted
	 *            the persisted to set
	 */
	public void setPersisted(boolean persisted) {
		this.persisted = persisted;
	}

	@Override
	protected void dispatch(UserProfileEditorClosedHandler handler) {
		handler.onTagEditorClosed(this);
	}
}
